$bg-white: #ffffff;
$border-color: #eaeef2;
$text-color: #24292e;
$hover-color: #f0f2f5;
$active-color: #0366d6;
$markdown-font: SFMono-Regular, Consolas, "Liberation Mono", Menlo, monospace;
.doc-container {
  display: flex;
  flex-direction: column;
  height: 100vh;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background-color: #f8f9fa;
  .header {
    position: sticky;
    top: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    height: 60px;
    padding: 0 24px;
    background-color: $bg-white;
    border-bottom: 1px solid rgb(0 0 0 / 5%);
    box-shadow: 0 1px 3px rgb(0 0 0 / 8%);
  }
  .doc-body {
    display: flex;
    flex: 1;
    overflow: hidden;
    background-color: $bg-white;
    .sidebar {
      width: 280px;
      min-width: 280px;
      height: 100%;
      overflow-y: auto;
      background-color: $bg-white;
      border-right: 1px solid $border-color;
      box-shadow: 1px 0 8px rgb(0 0 0 / 3%);
    }
    .content {
      flex: 1;
      padding: 24px 40px;
      overflow-y: auto;
      background-color: $bg-white;
    }
    .toc-sidebar {
      position: relative;
      flex-shrink: 0;
      width: 240px;
      padding-left: 20px;
      overflow: hidden;
      background-color: $bg-white;
      transition: all 0.3s ease;
      &:not(.show) {
        width: 0;
        border: none;
        box-shadow: none;
      }
      .toc-header {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 12px 16px;
        background-color: $bg-white;
        border-bottom: 1px solid #eaecef;
        h3 {
          margin: 0;
          font-size: 16px;
          font-weight: 600;
          color: $text-color;
        }
      }
      .btn {
        position: absolute;
        top: 50%;
        left: -5px;
        z-index: 999;
      }
      .toggle-toc {
        padding: 4px;
        color: #6a737d;
        .toc-icon {
          font-size: 20px;
        }
        &:hover {
          color: $text-color;
        }
      }
      .toc-container {
        height: calc(100% - 48px);
        padding: 8px 0;
        overflow-y: auto;
        .toc-item {
          padding: 6px 16px;
          overflow: hidden;
          font-size: 14px;
          color: $text-color;
          text-overflow: ellipsis;
          white-space: nowrap;
          cursor: pointer;
          transition: all 0.2s;
          &:hover {
            background-color: $hover-color;
          }
          &.active {
            font-weight: 500;
            color: $active-color;
            background-color: #e8f4ff;
          }
          &.toc-level-1 {
            padding-left: 16px;
            font-weight: 600;
          }
          &.toc-level-2 {
            padding-left: 24px;
          }
          &.toc-level-3 {
            padding-left: 32px;
            color: #6a737d;
          }
          &.toc-level-4 {
            padding-left: 40px;
            color: #959da5;
          }
        }
      }
    }
    .comments-panel {
      display: flex;
      flex-direction: column;
      flex-shrink: 0;
      width: 320px;
      background-color: $bg-white;
      border-left: 1px solid $border-color;
      box-shadow: -1px 0 8px rgb(0 0 0 / 3%);
      transition: all 0.3s ease;
      &:not(.show) {
        width: 0;
        overflow: hidden;
        border: none;
        box-shadow: none;
      }
    }
  }
  .editor-container {
    display: flex;
    width: 100%;
    height: 60vh;
    overflow: hidden;
    border: 1px solid #e1e4e8;
    border-radius: 8px;
  }
  .empty-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    padding: 40px;
    color: #a0aec0;
    text-align: center;
    .el-icon {
      margin-bottom: 16px;
      font-size: 48px;
      color: #cbd5e0;
    }
  }
}

/* 滚动条样式 */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-thumb {
  background-color: rgb(0 0 0 / 20%);
  border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
  background-color: rgb(0 0 0 / 30%);
}
::-webkit-scrollbar-track {
  background-color: transparent;
}
